package me.shurufa.utils;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;

/**
 * Create by andy (https://github.com/andyxialm)
 * Create time: 16/5/14 21:58
 * Description :
 */
public class PkgUtils {
    public static PackageInfo getPackageInfo(Context context){
        PackageManager pm = context.getPackageManager();
        try {
            return pm.getPackageInfo(context.getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e) {
        }
        return  new PackageInfo();
    }
}
